<?php
ob_start();
require_once substr(dirname(__FILE__),0,-1).'sub/init.php';
require_once ZEAI.'sub/conn.php';
require_once ZEAI.'cache/config_index.php';
//门店
if(!empty($AGT)){
	$agentSQL2=" AND a.agentid=".$AGT['agentid'];
	$AGT['sitetitle'] = (!empty($AGT['sitetitle']))?$AGT['sitetitle']:$AGT['title'];
	if(!empty($AGT['sitetitle']))$_INDEX['indexTitle']= trimhtml($AGT['sitetitle']);
}else{$AGT['sitetitle']='';}
//门店结束
require_once ZEAI.'cache/udata.php';
require_once ZEAI.'cache/config_tjdiy.php';
$nav=($t=='gps')?'gps':'index';
$switch = json_decode($_ZEAI['switch'],true);
$jumpurl = HOST;
switch ($submitok) {
	case 'ajax_iMarquee':
		function iMarqueeFn($rows){
			global $_ZEAI;
			$sex      = $rows['sex'];
			$nickname = trimhtml(dataIO($rows['nickname'],'out'));
			$content  = trimhtml(dataIO($rows['content'],'out'));
			$photo_s  = $rows['photo_s'];
			$photo_f  = $rows['photo_f'];
			$photo_ifshow = $rows['photo_ifshow'];
			$uflag        = $rows['uflag'];
			$photo_s_url = photo_s_out('{"smb":"s","sex":"'.$sex.'","photo_s":"'.$photo_s.'","photo_f":"'.$photo_f.'","photo_ifshow":"'.$photo_ifshow.'","uflag":"'.$uflag.'","outkind":"url"}');
			$nickname=($rows['ifnickname']!='NO')?$nickname:'';
			return '<li><img src="'.$photo_s_url.'"><font>'.$nickname.$content.'</font><i class="ico close" onClick="iMarqueeBox_off(this);">&#xe65b;</i></li>';
		}
		$c = '';
		$rt = $db->query("SELECT b.sex,b.nickname,a.uid,a.senduid,b.photo_f,b.photo_ifshow,b.flag AS uflag FROM ".__TBL_QIANXIAN__." a,".__TBL_USER__." b WHERE a.flag=2 AND a.senduid=b.id ORDER BY a.id DESC LIMIT 5 ");
		$total = $db->num_rows($rt);
		if ($total>0){
			for($i=1;$i<=$total;$i++) {
				$rows = $db->fetch_array($rt,'name');
				if(!$rows) break;
				$uid = $rows['uid'];
				$senduid = $rows['senduid'];
				$uid = '*'.substr($uid,1,3).'*'.substr($uid,4,1).'*';
				$senduid = '*'.substr($senduid,1,3).'*'.substr($senduid,4,1).'*';
				$rows['content'] = '恭喜会员'.$uid.'与'.$senduid.'牵线成功';
				$rows['ifnickname'] = 'NO';
				$c .= iMarqueeFn($rows);
			}
		}
		$rt=$db->query("SELECT a.uid,a.num,a.content,b.nickname FROM ".__TBL_MONEY_LIST__." a,".__TBL_TG_USER__." b WHERE a.content LIKE '%奖励%' AND a.kind=8 AND a.tg_uid=b.id AND b.flag=1 ORDER BY a.id DESC LIMIT 3");
		$total = $db->num_rows($rt);
		if ($total>0){
			for($i=1;$i<=$total;$i++) {
				$rows = $db->fetch_array($rt,'name');
				if(!$rows) break;
				$rows['content'] = '推广注册奖励'.$rows['num'].'元';
				$rows['sex'] = 1;
				$rows['photo_s'] = 'p/img/hnico.jpg?'.$_ZEAI['cache_str'];
				$rows['photo_f'] = 1;
				$rows['photo_ifshow'] = 1;
				$rows['uflag'] = 1;
				$c .= iMarqueeFn($rows);
			}
		}
		$rt = $db->query("SELECT a.kind,a.money,b.sex,b.sex,b.nickname,b.photo_s,b.photo_f,b.photo_ifshow,b.flag AS uflag FROM ".__TBL_PAY__." a,".__TBL_USER__." b WHERE (a.kind=1 OR a.kind=2 OR a.kind=3 OR a.kind=4 OR a.kind=7 OR a.kind=-1) AND a.uid=b.id AND a.flag=1 ORDER BY a.id DESC LIMIT 3");
		$total = $db->num_rows($rt);
		if ($total>0){
			for($i=1;$i<=$total;$i++) {
				$rows = $db->fetch_array($rt,'name');
				if(!$rows) break;
				switch ($rows['kind']) {
					case 1:$tt  = '升级了VIP会员';break;
					case 2:$tt  = '充值了'.$_ZEAI['loveB'];break;
					case 3:$tt  = '充值了余额';break;
					case 4:$tt  = '充值了活动报名费';break;
					case 7:$tt  = '进行了【认证】';break;
					case -1:$tt = '提现了'.$rows['money'].'元';break;
				}
				$rows['content'] = $tt;
				$c .= iMarqueeFn($rows);
			}
		}
		
		$rt=$db->query("SELECT a.uid,a.content,b.sex,b.nickname,b.photo_s,b.photo_f,b.photo_ifshow,b.flag AS uflag FROM ".__TBL_TREND__." a,".__TBL_USER__." b WHERE a.content<>'' AND a.uid=b.id AND b.flag=1 AND a.flag=1 ORDER BY a.id DESC LIMIT 3");
		$total = $db->num_rows($rt);
		if ($total>0){
			for($i=1;$i<=$total;$i++) {
				$rows = $db->fetch_array($rt,'name');
				if(!$rows) break;
				//$rows['content'] = '发布了动态';
				$rows['content'] = trimhtml(dataIO($rows['content'],'out'));
				$c .= iMarqueeFn($rows);
			}
		}
		$rt=$db->query("SELECT id,sex,nickname,photo_s,photo_f,photo_ifshow,flag AS uflag FROM ".__TBL_USER__." WHERE flag=1 ORDER BY id DESC LIMIT 3");
		$total = $db->num_rows($rt);
		if ($total>0){
			for($i=1;$i<=$total;$i++) {
				$rows = $db->fetch_array($rt,'name');
				if(!$rows) break;
				$rows['content'] = '注册了'.$_ZEAI['siteName'];
				$c .= iMarqueeFn($rows);
			}
		}
		exit($c);
	break;
	case 'ajax_private':
		$row = $db->ROW(__TBL_NEWS__,"content","id=1");
		$c=($row)?$row[0]:"<div class='nodatatips'><i class='ico'>&#xe608;</i>暂时木有内容</div>";
		json_exit(array('flag'=>1,'c'=>$c));
	break;
	case 'ajax_gps':
		if(!iflogin())json_exit(array('flag'=>'nologin','jumpurl'=>$jumpurl));
		$row = $db->ROW(__TBL_USER__,"id","latitude<>'' AND longitude<>'' AND id=".$cook_uid,"num");
		if ($row){
			json_exit(array('flag'=>1));
		}else{
			json_exit(array('flag'=>0,'msg'=>'请用【微信】访问并开启手机GPS定位后并同意授权'));
		}
	break;
	case 'ajax_gps_save':
		if(!iflogin())json_exit(array('flag'=>'nologin','jumpurl'=>$jumpurl));
		$latitude=trimhtml($latitude);$longitude=trimhtml($longitude);
		if(!empty($latitude) && !empty($longitude)){
			$db->query("UPDATE ".__TBL_USER__." SET latitude='$latitude',longitude='$longitude' WHERE id=".$cook_uid);
			json_exit(array('flag'=>1));
		}else{
			json_exit(array('flag'=>0,'msg'=>'获取数据为空，定位失败，请检查手机设置'));
		}
	break;
}
$list_showtype=(empty($_TJDIY['list_showtype']))?1:intval($_TJDIY['list_showtype']);
$showtype = (ifint($showtype,'1-3','1'))?$showtype:$list_showtype;
function topUarrFn() {
	global $_INDEX,$keyword;
	if($_INDEX['iTop'] != 1 || !empty($keyword))return '';
	global $db;
	$rt = $db->query("SELECT uid,addtime2 FROM ".__TBL_TOP_U__." LIMIT 10");
	$total = $db->num_rows($rt);
	if ($total > 0) {
		for($i=1;$i<=$total;$i++) {
			$rows = $db->fetch_array($rt,'num');
			if(!$rows) break;
			$uidlist[]  = $rows[0];
			$toptime2[$rows[0]]['addtime2']=$rows[1];
		}
		$uidlist = (is_array($uidlist))?implode(',',$uidlist):'';
		$topUarr = array('uidlist'=>$uidlist,'toptime2'=>$toptime2);
		return $topUarr;
	}
	return '';
}
//
if($_ZEAI['m_mb_index']==3){require_once ZEAI.'m/index2.php';exit;}
/*******U list******/
$nodatatips = "<div class='nodatatips'><i class='ico'>&#xe6e2;</i>暂时木有符合条件的用户</div>";
$FLDU="id,sex,grade,photo_s,photo_f,RZ,birthday,edu,pay,job,heigh,photo_ifshow,areatitle,nickname";
$SQLU=" flag=1 AND photo_s<>'' AND photo_f=1 AND kind<>4 AND nickname<>'' AND areatitle<>'' AND birthday<>'0000-00-00' AND heigh>0 AND edu>0 ".$agentSQL;
if(ifint($cook_uid && !empty($cook_sex)) && $_INDEX['iModuleU']==1){
	if($cook_ifadm!=1)$SQLU .= ($cook_sex==2)?" AND sex=1 ":" AND sex=2 ";
}
$O='';
$photo_smb=($showtype==3)?'b':'m';
if($_ZEAI['m_mb_index'] == 2){
	//topu
	$topUarr = topUarrFn();
	if(!empty($topUarr)){
		$topuidlist = $topUarr['uidlist'];
		$toptime2   = $topUarr['toptime2'];
		if(!empty($topuidlist)){
			$SQLU  .= " AND id NOT IN ($topuidlist) ";
		}
	}
	//topu end
	$_ZEAI['pagesize']= 8;$ik='index';
	$ZEAI_SELECT = "SELECT $FLDU FROM ".__TBL_USER__." WHERE ".$SQLU." ORDER BY refresh_time DESC";
	//
	$total_ppl  = $db->COUNT(__TBL_USER__,$SQLU);
	$ZEAI_totalP = ceil($total_ppl/$_ZEAI['pagesize']);
	//
	if($submitok == 'ajax_ppllist')exit(Zeai_ajax_ppllist_fn($ZEAI_totalP,$p));
}
function Zeai_ajax_ppllist_fn($totalP,$p) {
	global $_ZEAI,$db,$nodatatips,$ZEAI_SELECT,$ik;
	$p = intval($p);if ($p<1)$p=1;$totalP = intval($totalP);
	if($totalP==0 && $p == 1)return $nodatatips;
	if ($p > $totalP)exit("end");
	$LIMIT = ($p == 1)?$_ZEAI['pagesize']:($p-1)*$_ZEAI['pagesize'].",".$_ZEAI['pagesize'];
	$rt = $db->query($ZEAI_SELECT." LIMIT ".$LIMIT);
	$total = $db->num_rows($rt);
	if ($p == 1){
		if ($total <= 0)return $nodatatips;
		$fort= $total;
	}else{
		if ($total <= 0)exit("end");
		$fort= $_ZEAI['pagesize'];
	}
	$rows_ulist='';
	for($n=1;$n<=$fort;$n++) {
		$rows = $db->fetch_array($rt,'name');
		if(!$rows)break;
		if($ik=='index'){
		$srt=($p-1)*$_ZEAI['pagesize'];
		$AD=Zeai_pplAD($srt+$n);
		if(!empty($AD)){
			$img=UP.$AD['img'];$url=urldecode($AD['url']);
			$rows_ulist.='<a href="'.$url.'" class="pplad"><em><img class="alpha0_100_1s m" src="'.$img.'"></em><div class="uinfo"></div></a>';
		}}
		$rows_ulist .= rows_ulist($rows,$n);
	}
	return $rows_ulist;
}
/*******U list end******/
//banner
if ((!empty($_INDEX['mBN_path1_s']) || !empty($_INDEX['mBN_path2_s']) || !empty($_INDEX['mBN_path3_s'])) && $_INDEX['iBanner']==1 ){
	$ifbanner = true;
	$path1_s = $_INDEX['mBN_path1_s'];
	$path2_s = $_INDEX['mBN_path2_s'];
	$path3_s = $_INDEX['mBN_path3_s'];
	$path1_b = smb($path1_s,'b');
	$path2_b = smb($path2_s,'b');
	$path3_b = smb($path3_s,'b');
	$path1_url = (empty($_INDEX['mBN_path1_url']))?'javascript:;':$_INDEX['mBN_path1_url'];
	$path2_url = (empty($_INDEX['mBN_path2_url']))?'javascript:;':$_INDEX['mBN_path2_url'];
	$path3_url = (empty($_INDEX['mBN_path3_url']))?'javascript:;':$_INDEX['mBN_path3_url'];
	$banner3 = "";$upurl = $_ZEAI['up2']."/";$bnum=0;
	if (!empty($path1_s))$banner3.='<div class="bn_li" bj="0"><a href="'.$path1_url.'" target="_self"><img src="'.UP.$path1_b.'"></a></div>';// style="max-height:50vw"
	if (!empty($path2_s))$banner3.='<div class="bn_li" bj="1"><a href="'.$path2_url.'" target="_self"><img src="'.UP.$path2_b.'"></a></div>';
	if (!empty($path3_s))$banner3.='<div class="bn_li" bj="2"><a href="'.$path3_url.'" target="_self"><img src="'.UP.$path3_b.'"></a></div>';
}else{$ifbanner = false;}?>
<!doctype html><html><head><meta charset="utf-8">
<title><?php echo $_INDEX['indexTitle'];?></title>
<meta name="Keywords" content="<?php echo $_INDEX['indexKeywords'];?>">
<meta name="Description" content="<?php echo $_INDEX['indexContent'];?>">
<?php echo HEADMETA; ?>
<link href="<?php echo RES;?>m/css/m.css?<?php echo $_ZEAI['cache_str'];?>" rel="stylesheet" type="text/css" />
<link href="<?php echo HOST;?>/cache/zeaicolor.css?<?php echo $_ZEAI['cache_str'];?>" rel="stylesheet" type="text/css" />
<link href="<?php echo RES;?>m/css/index.css?<?php echo $_ZEAI['cache_str'];?>" rel="stylesheet" type="text/css" />
<script src="<?php echo RES;?>www_zeai_cn.js?<?php echo $_ZEAI['cache_str'];?>"></script>
<script src="<?php echo RES;?>m/js/m.js?<?php echo ADDTIME;?>"></script>
<script src="<?php echo RES;?>m/js/index.js?<?php echo $_ZEAI['cache_str'];?>"></script>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<meta name="generator" content="Zeai.cn V9" />
<?php if (is_weixin()){
	require_once ZEAI."api/weixin/jssdk.php";
	if(!empty($_INDEX['indexShareT'])){
		$shareT = dataIO($_INDEX['indexShareT'],'out');
		$shareC = dataIO($_INDEX['indexShareC'],'out');
		$shareP = UP.$_INDEX['indexShareP'];
	}else{
		$shareT = dataIO($_INDEX['indexTitle'],'out');
		$shareC = dataIO($_INDEX['indexContent'],'out');
		$shareP = UP.$_ZEAI['logo'];
	}?>
	<script src="<?php echo RES;?>jweixin-1.2.0.js"></script>
	<script>wx.config({debug:false,appId: '<?php echo $signPackage["appId"];?>',timestamp: <?php echo $signPackage["timestamp"];?>,nonceStr: '<?php echo $signPackage["nonceStr"];?>',signature: '<?php echo $signPackage["signature"];?>',jsApiList: ['getLocation','openLocation','hideMenuItems','onMenuShareTimeline','onMenuShareAppMessage','onMenuShareQQ','onMenuShareWeibo']});
	var share_title = '<?php echo $shareT.$AGT['sitetitle']; ?>',
	share_desc  = '<?php echo $shareC; ?>',
	share_link  = '<?php echo HOST; ?>',
	share_imgUrl= '<?php echo $shareP; ?>?<?php echo $_ZEAI['cache_str'];?>';
	wx.ready(function () {
		wx.onMenuShareAppMessage({title:share_title,desc:share_desc,link:share_link,imgUrl:share_imgUrl});
		wx.onMenuShareTimeline({title:share_title,link:share_link,imgUrl:share_imgUrl});
	});
    </script>
<?php }?>
<script>var browser='<?php echo browser();?>',showtype=<?php echo intval($showtype);?>;</script>
<style>
#backtop a,.i_box h1{color:<?php echo $_ZEAI['mob_mbcolor'];?>}
.btmKefuBtn{background-color:<?php echo $_ZEAI['mob_mbcolor'];?>;color:#fff}
.top,.iarticle .kind a.ed{background-color:<?php echo $_ZEAI['mob_mbcolor'];?>}
.top_mini4,.top{background-image:url("<?php echo RES;?>m/img/my_bg.png");background-size:100%}
.applytop{color:<?php echo $_ZEAI['mob_mbcolor'];?>}
.i_box h1 b{background-color:<?php echo $_ZEAI['mob_mbcolor'];?>}
.iubtn a.ed{background-color:<?php echo $_ZEAI['mob_mbcolor'];?>}
.iarticle .kind a.ed{border-color:<?php echo $_ZEAI['mob_mbcolor'];?>}
.iparty a .djs .timestyle{background-color:#f70}
.iMarqueeBox h5 i{background-image:-webkit-linear-gradient(90deg,rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,1),rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.7))}
.iMarqueeBox h5 span{color:<?php echo $_ZEAI['mob_mbcolor'];?>}
.zhiding .zdcon a span{background-color:rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.7)}
.index_private .C .agreebox button:first-child{background-color:#fff;border:1px solid <?php echo $_ZEAI['mob_mbcolor'];?>;color:<?php echo $_ZEAI['mob_mbcolor'];?>}
.index_private .C .agreebox button:last-child{background-color:<?php echo $_ZEAI['mob_mbcolor'];?>;border-color:<?php echo $_ZEAI['mob_mbcolor'];?>;color:#fff}
.ZEAI_list a .uinfo .data span b,.ppllist a .uinfo .data span b{background-color:rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.1);color:<?php echo $_ZEAI['mob_mbcolor'];?>}
.ZEAI_list a em .nik,.ppllist a em .nik{background:url("<?php echo RES;?>m/img/nikbg.png") repeat-x;background-size: 100% 100%;}
.hnlist .add{background-color:<?php echo $_ZEAI['mob_mbcolor'];?>}
/*topnav*/
.iubtn a.ed:after{background-color:<?php echo $_ZEAI['mob_mbcolor'];?>}
.bouncelogin a.size4{box-shadow:0 .3rem .8rem rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.4);background:-webkit-linear-gradient(315deg,rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.6) 0%,<?php echo $_ZEAI['mob_mbcolor'];?> 100%);background-color:#fff}
.bouncelogin em img{border-color:rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.2)}
.izt .iztbox a img{box-shadow:0 .3rem .5rem 0 rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.2)}

</style>
</head>
<body>
<div class="top">
	<em id="logo" onclick="logoFn();"><img src="<?php echo UP.$_ZEAI['logo'];?>?<?php echo $_ZEAI['cache_str'];?>" class="logo"></em>
    <?php if(@!in_array('huxuan',$navarr) && @!in_array('trend',$navarr)){echo '<h1>'.$_ZEAI['siteName'].'</h1>';}else{?>
	<a href="<?php echo HOST;?>"<?php echo (empty($z) || $z=='index')?' class="ed"':'';?>>推荐</a>
	<?php if(@in_array('huxuan',$navarr)){?><a href="<?php echo mHref('huxuan');?>"<?php echo ($z=='huxuan')?' class="ed"':'';?>>互选</a><?php }?>
	<?php if(@in_array('trend',$navarr)){?><a href="<?php echo mHref('trend');?>"<?php echo ($z=='trend')?' class="ed"':'';?>>动态</a><?php }?>
    <?php }?>
</div>
<div class="logobox divTopDown" id="logobox">
	<?php 
    $rt2=$db->query("SELECT id,title,content,path_s FROM ".__TBL_CRM_AGENT__." WHERE flag=1 ORDER BY px DESC,id DESC");
    $total2 = $db->num_rows($rt2);
    if ($total2 > 0) {
        echo '<a href="'.HOST.'/?agentid=all" class="idxbtn"><i class="ico">&#xe665;</i> 进入总站</a>';
        for($j=0;$j<$total2;$j++) {
            $rows2 = $db->fetch_array($rt2,'name');
            if(!$rows2) break;
			$agt_id         = $rows2['id'];
			$agt_path_s     = $rows2['path_s'];
			$agt_path_s_url = (!empty($agt_path_s))?UP.$agt_path_s:RES.'noP.gif?'.$_ZEAI['cache_str'];
			$agt_title      = trimhtml($rows2['title']);
			$agt_content    = trimhtml($rows2['content']);
			if($cook_agentid==$agt_id && $agentid!='all'){
				$agt_cls=' class="on"';
				$agt_edstr=' <i class="ico zeaicolor">&#xe60f;</i>';
			}else{
				$agt_cls='';$agt_edstr='';
			}?>
            <a href="<?php echo HOST.'/?agentid='.$agt_id;?>"<?php echo $agt_cls;?>>
            <img src="<?php echo $agt_path_s_url;?>">
            <em>
            	<h2><?php echo $agt_title.$agt_edstr;?></h2>
            	<h5><?php echo $agt_content;?></h5>
            </em>
            <div class="clear"></div>
            </a>
    <?php }}?>
</div>
<?php if ($ifbanner && $_INDEX['iBanner']==1){ ?>
<div class="bn" id="bn">
    <div class="bn_main"><?php echo $banner3; ?></div>
    <div class="bn_ico" id="bn_ico"></div>
</div>
<?php }else{?>
<div class="bn"<?php echo ' style="margin-top:6rem"';?>></div>
<?php }
if($_ZEAI['navkind']==2){
	$navdiy = json_decode($_ZEAI['navdiy'],true);$nn=0;$newnavidy=array();
	foreach ($navdiy as $V){if($V['f']==0 || empty($V['t']) || empty($V['img']) || empty($V['url']))continue;$nn++;$newnavidy[]=$V;}
	if($nn % 4==0){$inavAW=25;}elseif($nn % 3==0){$inavAW=33;}elseif($nn % 2==0){$inavAW=50;}
	if (count($newnavidy) >= 1 && is_array($newnavidy)){echo '<style>.inav a{width:'.$inavAW.'%}</style><div class="inav">';foreach ($newnavidy as $V){?><a href="<?php echo dataIO($V['url'],'out');?>"><img src="<?php echo UP.$V['img'];?>"><span><?php echo dataIO($V['t'],'out');?></span></a><?php }echo '</div>';}?>
<?php }else{
	$n = 0;$inavAW='';
	if(@in_array('dating',$navarr))$n++;
	if(@in_array('manghe',$navarr))$n++;
	if(@in_array('shop',$navarr))$n++;
	if(@in_array('qun',$navarr))$n++;
	if(@in_array('lovetest',$navarr))$n++;
	if(@in_array('party',$navarr))$n++;
	if(@in_array('hn',$navarr))$n++;
	if(@in_array('article',$navarr))$n++;
	if($n % 4==0){$inavAW=25;}elseif($n % 3==0){$inavAW=33;}elseif($n % 2==0){$inavAW=50;}
	if($n<8 && !empty($inavAW))echo '<style>.inav a{width:'.$inavAW.'%}</style>';?>
	<div class="inav">
        <?php if(@in_array('manghe',$navarr)){?><a href="<?php echo mHref('manghe');?>"><i class="_manghe ico">&#xe667;</i><span>脱单盲盒</span></a><?php }?>
		<?php if(@in_array('dating',$navarr)){?><a href="<?php echo mHref('dating');?>"><i class="_dating ico">&#xe653;</i><span>约会</span></a><?php }?>
        <?php if(@in_array('shop',$navarr)){?><a href="<?php echo mHref('shop');?>"><i class="_shop ico">&#xe71a;</i><span>商盟</span></a><?php }?>
        <?php if(@in_array('qun',$navarr)){?><a href="<?php echo mHref('qun');?>"><i class="_qun ico">&#xe647;</i><span>单身群</span></a><?php }?>
        <?php if(@in_array('lovetest',$navarr)){?><a href="<?php echo mHref('lovetest');?>"><i class="_trend ico">&#xe65a;</i><span>情感测试</span></a><?php }?>
        <?php if(@in_array('party',$navarr)){?><a href="<?php echo mHref('party');?>"><i class="_party ico">&#xe695;</i><span>相亲活动</span></a><?php }?>
        <?php if(@in_array('hn',$navarr)){?><a href="<?php echo mHref('hongniang');?>"><i class="_hn ico">&#xe613;</i><span>红娘服务</span></a><?php }?>
        <?php if(@in_array('article',$navarr)){?><a href="<?php echo mHref('article');?>"><i class="_article ico">&#xe654;</i><span>婚恋学堂</span></a><?php }?>
	</div>
<?php }?>

<?php
if($_INDEX['iXbn3']==1){?>
<div class="xbn3">
    <a href="<?php echo mHref('reg');?>"><h1>免费登记</h1><h5>30秒注册脱单</h5><i class="ico">&#xe65a;</i></a>
    <a href="<?php echo mHref('user');?>?t=cert"><h1>实名相亲</h1><h5>通过认证会员</h5><i class="ico">&#xe668;</i></a>
    <a href="<?php echo mHref('user');?>?t=new"><h1>最新加入</h1><h5>最新登记会员</h5><i class="ico">&#xe605;</i></a>
</div>
<?php }if($_INDEX['iZT']==1){
    $rt=$db->query("SELECT id,path_s,url FROM ".__TBL_IZT__." WHERE flag=1 AND path_s<>'' ORDER BY px DESC,id DESC");
    $total = $db->num_rows($rt);
    if ($total > 0) {?>
        <div class="izt">
            <div class="iztbox"><ul id="izt_move">
			<?php
            for($i=1;$i<=$total;$i++) {
                $rows = $db->fetch_array($rt,'num');
                if(!$rows) break;
                $fid=$rows[0];
                $path_s=$rows[1];
                $url=trimhtml(dataIO($rows[2],'out'));
				$url=(!empty($url))?$url:HOST.'/m/izt.php?n='.$i.'&id='.$fid;
				echo '<a href="'.$url.'"><img src="'.UP.$path_s.'"></a>';
			}?>
            </ul></div>
        </div>
	<?php
	}
}if ($_INDEX['iTop'] == 1 && $_ZEAI['m_mb_index'] == 1){?>
    <div class="i_box">
        <h1>置顶会员<b></b></h1>
        <h5>也想展示在这里 立即 <a href="<?php echo HOST;?>/m/my_top.php" class="applytop">申请置顶<i class="ico">&#xe601;</i></a></h5>
    </div>
    <div class="zhiding">
        <div class="zdcon">
            <?php
            $rt = $db->query("SELECT uid,addtime2 FROM ".__TBL_TOP_U__." LIMIT 15");//ORDER BY rand() 
            $total = $db->num_rows($rt);
            if ($total > 0) {
                for($i=1;$i<=$total;$i++) {
                    $rows = $db->fetch_array($rt,'num');
                    if(!$rows) break;
                    $uidlist[] = $rows[0];
                    $toptime2[$rows[0]]['addtime2']=$rows[1];
                }
                $uidlist = (is_array($uidlist))?implode(',',$uidlist):'';
                $rt=$db->query("SELECT id,sex,areatitle,nickname,photo_s,photo_f,click,photo_ifshow,openid,subscribe FROM ".__TBL_USER__." WHERE id IN ($uidlist) AND birthday<>'0000-00-00' AND heigh>0 AND flag=1 AND dataflag=1".$agentSQL." LIMIT 15");
                $total = $db->num_rows($rt);
                if ($total > 0) {
					while($tmprows = $db->fetch_array($rt,'name')){$newrows[]=$tmprows;}
                    echo '<ul id="itop_move">';
					shuffle($newrows);
					foreach ($newrows as $rows) {
                        $uid           = $rows['id'];
                        $flag          = 1;
                        $sex           = $rows['sex'];
                        $click         = $rows['click'];
                        $photo_ifshow  = $rows['photo_ifshow'];
                        $openid     = $rows['openid'];
                        $subscribe  = $rows['subscribe'];
                        $areatitle  = dataIO($rows['areatitle'],'out');
                        $aARR = explode(' ',$areatitle);$A1=$aARR[0];$A2=$aARR[1];$A3=$aARR[2];
                        if(!empty($A3)){
                            $areatitle_str = $A2.' / '.$A3;	
                        }elseif(!empty($A2)){
                            $areatitle_str = $A1.' / '.$A2;	
                        }elseif(!empty($A1)){
                            $areatitle_str = $A1;	
                        }else{$areatitle_str=='';}
                        $areatitle_str  = str_replace("不限","",$areatitle_str);
                        $nickname      = trimhtml(dataIO($rows['nickname'],'out'));
                        $photo_s       = $rows['photo_s'];
                        $photo_f       = $rows['photo_f'];
                        $photo_s_url = photo_s_out('{"smb":"m","sex":"'.$sex.'","photo_s":"'.$photo_s.'","photo_f":"'.$photo_f.'","photo_ifshow":"'.$photo_ifshow.'","uflag":"'.$flag.'","outkind":"url"}');					
                        $addtime2=intval($toptime2[$uid]['addtime2']);
                        if($addtime2<ADDTIME){
                            $db->query("DELETE FROM ".__TBL_TOP_U__." WHERE uid=".$uid);
                            $C = $nickname.'您好，您的置顶时间已过期~~，排名已下架，为了避免你与另一半擦肩而过，建议你尽快续费重新置顶　<a href="'.HOST.'/m/my_top.php'.'" class=aQING>立即置顶</a>';
                            $db->SendTip($uid,'您的置顶时间已过期，请速重新置顶',dataIO($C,'in'),'sys');
                            if (!empty($openid) && $subscribe==1){
                                $first     = urlencode($nickname.',您的置顶时间已过期！');
                                $keyword1  = urlencode('排名已下架');
                                $keyword3  = urlencode('系统自动执行');
                                $remark    = urlencode('为了避免你与另一半擦肩而过，建议你尽快续费重新置顶');
                                @wx_mb_sent('mbbh=ZEAI_ADMIN_INFO&openid='.$openid.'&keyword1='.$keyword1.'&keyword3='.$keyword3.'&time='.ADDTIME.'&first='.$first.'&remark='.$remark.'&url='.urlencode(HOST.'/m/my_top.php'));
                            }
                        }
						?>
                        <a href="<?php echo mHref('u',$uid);?>">
                            <img src="<?php echo $photo_s_url;?>" />
                            <p><?php echo $nickname;?></p>
                            <em><?php echo $areatitle_str;?></em>
                        </a><?php
                    }
                    echo '</ul>';
                }
            }
            ?>
            <div class="clear"></div>
        </div>
    </div>
<?php }?>

<?php
if ($_INDEX['iMarquee'] == 1){?>
<div class="iMarqueeBox">
    <div id="iMarquee" class="iMarquee">
        <li><img src="<?php echo UP.$_ZEAI['logo'];?>?<?php echo $_ZEAI['cache_str'];?>"><font>欢迎来到<?php echo $_ZEAI['siteName'];?></font><i class="ico close" onClick="iMarqueeBox_off(this);">&#xe65b;</i></li>
    </div>
</div>
<script>setTimeout(function(){zeai_iMarqueeFn();},2000);</script>
<?php }?>
<div class="clear"></div>
<div class="iubtn">
	<a href="<?php echo mHref('user');?>" class="ed">推荐</a>
	<?php if ($_INDEX['iModuleU'] == 2){?>
        <a href="<?php echo mHref('user');?>?t=ext&sex=1">男生</a>
        <a href="<?php echo mHref('user');?>?t=ext&sex=2">女生</a>
	<?php }else{ ?>
        <a href="javascript:gpsbtnFn('<?php echo $cook_longitude;?>','<?php echo $cook_latitude;?>','<?php echo $cook_areatitle;?>');">附近</a>
        <a href="<?php echo mHref('user');?>?t=vip">VIP</a>
	<?php }?>
    <a href="<?php echo mHref('user');?>?t=match">匹配</a>
</div>
<div class="ZEAI_list_tips"><h5>想尽快找到心仪的TA吗 我要 <a href="<?php echo HOST;?>/m/my_refresh.php" class="applytop">立即展示<i class="ico">&#xe601;</i></a></h5></div>

<?php
//瀑布流
if($_ZEAI['m_mb_index'] == 2){?>
    <div id="ZEAI_list" class="ppllist">
        <!--topu-->
        <?php
        if(!empty($topuidlist)){
            $rt=$db->query("SELECT ".$FLDU.",openid,subscribe FROM ".__TBL_USER__." WHERE id IN ($topuidlist) AND birthday<>'0000-00-00' AND heigh>0 AND flag=1 AND dataflag=1 ".$agentSQL." LIMIT 10");
            $total = $db->num_rows($rt);
            if ($total > 0) {
                while($tmprows = $db->fetch_array($rt,'name')){$newrows[]=$tmprows;}
                shuffle($newrows);
                foreach ($newrows as $rows){echo rows_ulist($rows,'top',$toptime2);}
            }
        }
        ?>
        <!--topu end-->
        <?php echo Zeai_ajax_ppllist_fn($ZEAI_totalP,1); ?>
    </div>
    <div id="end"></div>
    <script src="<?php echo RES;?>m/js/zeai_loading_ppldata.js?<?php echo ADDTIME;?>"></script>
	<script>
		pplLoad(o('ZEAI_list'));
		var ZEAI_totalP = parseInt(<?php echo $ZEAI_totalP; ?>);
		var postjson = {submitok:'ajax_ppllist',ZEAI_totalP:ZEAI_totalP};
		zeaiOnscroll_json={url:'index'+zeai.extname,data:postjson};
		<?php echo(ifint($cook_uid))?'var iflogin=true;':'var iflogin=false;';?>
    </script>
    <?php
	if ($total_ppl > $_ZEAI['pagesize'] && !ifint($cook_uid)){?>
    <!--游弹-->
    <div id="index_bounce_box" class="bouncelogin">
        <em><img src="<?php echo RES;?>photo_m.jpg?<?php echo $_ZEAI['cache_str'];?>"></em>
        <h1>注册/登录 查看更多会员<br>缘分就在一瞬间，赶快去登录！</h1>
        <a class="btn size4 zeaibg W80_ yuan" href="<?php echo HOST;?>/m/login.php"><font>去注册/登录</font><span class="zeaicolor">私密</span></a>
        <a class="closediv" href="javascript:index_divclose.click();">暂不登录</a>
    </div><?php
	}
}else{
	//多模块
	$moreUA=($_INDEX['iModuleU_bigmore'] == 1)?HOST.'/m/index_more_big.php':mHref('user').'?photo_s=1&t=ext';
	?>
    <div class="ZEAI_list"><?php echo getUlist1($SQLU); ?></div>
    <div class="clear"></div><a class="iuboxmore" href="<?php echo $moreUA;?>">查看更多会员</a>
    <?php
    //交友活动开始
    if(@in_array('party',$navarr)){
        $rt=$db->query("SELECT id,title,address,flag,jzbmtime,path_s FROM ".__TBL_PARTY__." WHERE flag>0 AND path_s<>''".$agentSQL." ORDER BY px DESC LIMIT 2");
        $total = $db->num_rows($rt);
        if ($total > 0) {?>
            <div class="i_box">
                <h1>相亲活动<b></b></h1>
                <h5>线下面对面相亲 <a href="<?php echo mHref('party');?>" class="applytop">更多<i class="ico">&#xe601;</i></a></h5>
            </div>
            <div class="iparty publicbox">
            <?php
            for($j=1;$j<=$total;$j++) {
                $rows = $db->fetch_array($rt,'name');
                if(!$rows)break;
                $fid   = $rows['id'];
                $path_s   = $rows['path_s'];
                $jzbmtime = $rows['jzbmtime'];
                $flag     = $rows['flag'];
                $address = dataIO($rows['address'],'out');
                $title = dataIO($rows['title'],'out');
                $path_b=smb($path_s,'b');
                $path_b_url=UP.$path_b;
                $totals  = $jzbmtime-ADDTIME;
                $jcls=($totals > 0)?'j':'j ed';
                $djs = '<div class="djs">'.party_djs($flag,$jzbmtime).'</div>';
                ?>
                <a class="li" href="<?php echo mHref('party',$fid);?>">
                    <img src="<?php echo $path_b_url;?>">
                    <?php echo $djs;?>
                    <div class="address"><?php echo $address;?></div>
                    <div class="clear"></div>
                </a>
                <?php
            }
            echo '<div class="clear"></div></div>';
        }
    }
    //交友活动结束
    //红娘开始
    if(@in_array('hn',$navarr)){
        $rt2=$db->query("SELECT id,sex,truename,path_s,title FROM ".__TBL_CRM_HN__." WHERE ifwebshow=1 AND flag=1 AND path_s<>''".$agentSQL." ORDER BY px DESC,id DESC LIMIT 2");
        $total2 = $db->num_rows($rt2);
        if ($total2 > 0) {?>
            <!--<div class="uline"></div>-->
            <div class="i_box">
                <h1>红娘团队<b></b></h1>
                <h5>线下一对一服务 <a href="<?php echo HOST;?>/m/hongniang.php" class="applytop">更多<i class="ico">&#xe601;</i></a></h5>
            </div>
            <div class="hnlist ">
            <?php
            for($j=1;$j<=$total2;$j++) {
                $rows = $db->fetch_array($rt2,'name');
                if(!$rows)break;
                $id       = $rows['id'];
                $sex      = $rows['sex'];
                $truename = dataIO($rows['truename'],'out',7);
                $path_s   = $rows['path_s'];
                $title    = dataIO($rows['title'],'out');
                $href     = HOST.'/m/hongniang.php?hid='.$id;
                $sex_title= ($sex == 2)?'她':'他';
                $path_s_url = (!empty($path_s))?UP.smb($path_s,'b'):RES.'photo_m'.$sex.'.png';
                $O .= '<a class="li" href="'.$href.'"><img src="'.$path_s_url.'">';
                $O .= '<h2>'.$truename.'</h2>';
                $O .= '<h4>'.$title.'</h4>';
                $O .= '<span class="add"><i class="ico">&#xe622;</i>找'.$sex_title.'牵线</span></a>';
                if($j % 2 == 0)$O .= '<div class="clear"></div>';
            }
            echo $O;?>
            </div>
            <div class="clear"></div>
            <?php
        }
    }
    //红娘结束
    //婚恋学堂开始
    if(@in_array('article',$navarr)){
    echo '<div class="clear"></div>';
    $rt2=$db->query("SELECT id,title FROM ".__TBL_NEWS_KIND__." WHERE id>1 ORDER BY px DESC,id DESC LIMIT 4");
    $total2 = $db->num_rows($rt2);
    if ($total2 > 0) {?>
        <!--<div class="uline"></div>-->
        <div class="i_box">
            <h1>婚恋学堂<b></b></h1>
            <h5>教您如何谈恋爱 <a href="<?php echo mHref('article');?>" class="applytop">更多<i class="ico">&#xe601;</i></a></h5>
        </div>
        <div class="iarticle publicbox">
            <div class="kind" id="iarticlekind">
                <?php
                for($j=0;$j<$total2;$j++) {
                    $rows2 = $db->fetch_array($rt2,'num');
                    if(!$rows2) break;
                    $kindid   = $rows2[0];
                    $kindtitle=dataIO($rows2[1],'out');
                    $clss=($j==0)?' class="ed"':'';
                    echo '<a href=\''.HOST.'/m/article.php?kind='.$kindid.'&kindtitle='.$kindtitle.'\' '.$clss.' kindid="'.$kindid.'">'.$kindtitle.'</a>';
                    //if($j==0)$kind=$kindid;
                }?>
            </div>
        <?php
        //$SQL = (ifint($kind))?" AND kind=".$kind:'';
        $rt2=$db->query("SELECT id,title,kindtitle,path_s,addtime,click FROM ".__TBL_NEWS__." WHERE kind>1 AND id>2 AND flag=1 AND path_s<>'' ".$SQL." ORDER BY px DESC,id DESC LIMIT 3");
        $total2 = $db->num_rows($rt2);
        if ($total2 > 0) {
            for($j=0;$j<$total2;$j++) {
                $rows2 = $db->fetch_array($rt2,'name');
                if(!$rows2) break;
                $id   = $rows2['id'];
                $title=dataIO($rows2['title'],'out');
                $path_s    = $rows2['path_s'];
                $click    = $rows2['click'];
                $addtime   = YmdHis($rows2['addtime'],'Ymd');
                $kindtitle = dataIO($rows2['kindtitle'],'out');
                //$path_b = smb($path_s,'b');
                //$path_b_url=UP.$path_b;
                $path_s_url=UP.$path_s;
                ?>
                <a class="li" href="<?php echo HOST;?>/m/article_detail.php?id=<?php echo $id;?>">
                    <img src="<?php echo $path_s_url;?>">
                    <em>
                        <h4><?php echo $title;?></h4>
                        <div><span><i class="ico">&#xe643;</i> <?php echo $click;?></span><font><?php echo $addtime;?></font></div>
                    </em>
                    <div class="clear"></div>
                </a><?php
        }}?>
        </div><?php
        }
        echo '<div class="clear"></div>';
    }
    //婚恋学堂结束
}
?>
<div class="clear"></div>
<?php $kf_tel=dataIO($_ZEAI['kf_tel'],'out');$kf_wxpic=dataIO($_ZEAI['kf_wxpic'],'out'); $kf_mob=dataIO($_ZEAI['kf_mob'],'out');?>
<a href="javascript:;" id="btmKefuBtn" class="btmKefuBtn"><i class="ico">&#xe6a6;</i>客服</a>
<div id="backtop"><a id="btmTopBtn" onClick="zeai.setScrollTop(0);"><i class="ico">&#xe60c;</i>顶部</a></div>
<div id="btmKefuBox" class="my-subscribe_box"><img src="<?php echo UP.$kf_wxpic;?>"><h3>长按二维码添加客服微信<br>【开通会员-飞速脱单】</h3></div>
<?php if ($ifbanner && $_INDEX['iBanner']==1){ ?>
	<script>var ifbanner=<?php echo intval($ifbanner);?>,Wbfb=0.94,Hbfb=0.463;</script>
    <script src="<?php echo RES;?>jq183.js"></script><script src="<?php echo RES;?>m/js/shop_zeai_banner4.js?<?php echo $_ZEAI['cache_str'];?>"></script>
<?php }?>
<script>
btmKefuBtn.onclick=function(){ZeaiM.div({obj:btmKefuBox,w:26,h:28});}
<?php if ($_ZEAI['m_mb_index'] == 1){?>document.body.onscroll = backtop_alone;<?php }?>
<?php if($_INDEX['iZT']==1){?>
if(sessionStorage.izt!=1 && !zeai.empty(o('izt_move'))){
	setTimeout(function(){LRmoveFn(izt_move,200,1);},2000);
	setTimeout(function(){LRmoveFn(izt_move,200,0);sessionStorage.izt=1;},5000);
}
<?php }if($_INDEX['iTop'] == 1 && $_ZEAI['m_mb_index'] == 1){?>
if(sessionStorage.itop!=1 && !zeai.empty(o('itop_move'))){
	setTimeout(function(){LRmoveFn(itop_move,200,1);},3000);
	setTimeout(function(){LRmoveFn(itop_move,200,0);sessionStorage.itop=1;},6000);
}
<?php }?>
</script>
<?php if ($_INDEX['index_private'] == 1){?>
    <div class="index_private" id="index_private">
        <div class="C">
            <h1>《个人隐私与用户协议》提示</h1><em id="index_privateC"></em>
            <div class="agreebox"><button class="btn size4 FL" type="button" onClick="history.back(-1);zeai.msg('同意后方可进入');">不同意</button>
            <button class="btn size4 FR" type="button" onClick="index_privateFn(1)">同意</button></div>
        </div>
    </div>
    <script>
    if(zeai.empty(localStorage.index_private)){
        setTimeout(function(){zeai.ajax({url:MHOST+'/index'+zeai.extname,data:{submitok:'ajax_private'}},function(e){var rs=zeai.jsoneval(e);
            if(rs.flag==1){zeai.mask({son:index_private,cancelBubble:'off',maskcls:'mask1',click:'no'});index_privateC.html(html_decode(rs.c));}
        });},300);
        function index_privateFn(k){if(k==1){localStorage.index_private='WWWzeaiCN_private';}o('Mindex_private').parentNode.removeChild(o('Mindex_private'));}
    }
    </script>
    <?php 
	$bounce['flag']['indexgg']==0;//阻崩
}
//蹦
$bounce=json_decode($_ZEAI['bounce'],true);
if($bounce['flag']['indexgg'] == 1){
	$bouncev = '';
	$bounceTip = 'cook_index_bounce'.YmdHis(ADDTIME,'d');
	if($_COOKIE[$bounceTip] != 'indexgg'){
		$bouncev ='indexgg';
		$picurl  = UP.$bounce['indexgg_picurl'];
		$url     = $bounce['indexgg_url'];
	}
	if(!empty($bouncev)){
		if($_COOKIE[$bounceTip] != $bouncev){
			setcookie($bounceTip,$bouncev,null,"/",$_ZEAI['CookDomain']);
			?>
			<style>.div_pic img{width:100%;display:block;margin:0 auto}</style>
            <div id="index_bounce_box2" class="bounce_box bounce"><img src="<?php echo $picurl;?>" onClick="zeai.openurl('<?php echo $url;?>');"></div>
			<script>var index_divclose;setTimeout(function(){index_divclose=ZeaiM.div_pic({obj:index_bounce_box2,w:32,h:36});},1500);</script>
			<?php
		}
	}
}
require_once ZEAI.'m/TRnav.php';
if($_ZEAI['m_mb_index'] != 2)require_once ZEAI.'m/footer.php';
require_once ZEAI.'m/bottom.php';
function rows_ulist($rows,$i,$n=1) {
	global $db,$_ZEAI,$showtype,$photo_smb;
	$uid       = $rows['id'];
	$sex       = $rows['sex'];
	$grade     = $rows['grade'];
	$photo_s   = $rows['photo_s'];
	$photo_f   = $rows['photo_f'];
	$heigh     = $rows['heigh'];
	$job       = $rows['job'];
	$areatitle = $rows['areatitle'];
	$birthday  = $rows['birthday'];
	$nickname  = trimhtml(dataIO($rows['nickname'],'out'));
	$age = getage($rows['birthday']);
	$RZ  = $rows['RZ'];$RZarr = explode(',',$RZ);
	$pay = $rows['pay'];
	$edu = $rows['edu'];
	$photo_ifshow = $rows['photo_ifshow'];
	$photo_m_url  = photo_s_out('{"smb":"m","sex":"'.$sex.'","photo_s":"'.$photo_s.'","photo_f":"'.$photo_f.'","photo_ifshow":"'.$photo_ifshow.'","uflag":"'.$uflag.'","outkind":"url"}');
	$href=mHref('u',$uid);
	$age_str   = ($age>18)?$age.'岁':'';
	$edu_str   = (ifint($edu))?udata('edu',$edu):'';
	$heigh_str = (ifint($heigh))?' · '.udata('heigh',$heigh).' · ':'';
	$pay_str   = (ifint($pay))?'<b>'.udata('pay',$pay).'</b>':'';
	$job_str   = (ifint($job))?'<b>'.udata('job',$job).'</b>':$pay_str;
	$A='';
	if(!empty($areatitle)){
		$A=explode(' ',$areatitle);$A1=$A[0];$A2=$A[1];$A3=$A[2];
		if(!empty($A3)){$A=$A3;}elseif(!empty($A2)){$A=$A2;}
	}
	$A_str = (!empty($A))?'<b class="ico">&#xe624; '.$A.'</b>':$pay_str;
	//topu start
	if($i=='top'){
		$toptime2 = $n;
		$addtime2=intval($toptime2[$uid]['addtime2']);
		if($addtime2<ADDTIME){
			$db->query("DELETE FROM ".__TBL_TOP_U__." WHERE uid=".$uid);
			$C = $nickname.'您好，您的置顶时间已过期~~，排名已下架，为了避免你与另一半擦肩而过，建议你尽快续费重新置顶　<a href="'.HOST.'/m/my_top.php'.'" class=aQING>立即置顶</a>';
			$db->SendTip($uid,'您的置顶时间已过期，请速重新置顶',dataIO($C,'in'),'sys');
			if (!empty($openid) && $subscribe==1){
				$first     = urlencode($nickname.',您的置顶时间已过期！');
				$keyword1  = urlencode('排名已下架');
				$keyword3  = urlencode('系统自动执行');
				$remark    = urlencode('为了避免你与另一半擦肩而过，建议你尽快续费重新置顶');
				@wx_mb_sent('mbbh=ZEAI_ADMIN_INFO&openid='.$openid.'&keyword1='.$keyword1.'&keyword3='.$keyword3.'&time='.ADDTIME.'&first='.$first.'&remark='.$remark.'&url='.urlencode(HOST.'/m/my_top.php'));
			}
		}
		$topuico = '<div class="topuico">推荐</div>';
	}else{
		$topuico = '';
	}
	//topu end
	$O  ='';
	$O .= '<a href="'.$href.'" sex="'.$sex.'"><em'.$blurclass.'><img class="alpha0_100_1s m" src="'.$photo_m_url.'" />';
	$O .= '<div class="nik"><span>'.$nickname.'</span></div>';//'.uicon($sex.$grade).'
	$O .= ($grade>1)?'<img src="'.RES.'m/img/vipj.png?"'.$_ZEAI['cache_str'].' class="vipj">':'';
	$O .= '</em>';
	$O .= '<div class="uinfo">';
	$O .= '<div class="data"><span><font>'.$age_str.$heigh_str.$edu_str.'</font></span><span>'.$A_str.$job_str.'</span></div>';//'.uicon($sex.$grade).'
	$O .= $topuico;
	$O .= '</div>';
	if(in_array('photo',$RZarr)){
		$O.= '<img src="'.RES.'m/img/rzj2.png?'.$_ZEAI['cache_str'].'" class="rzj">';
	}elseif(in_array('identity',$RZarr)){
		$O.= '<img src="'.RES.'m/img/rzj.png?'.$_ZEAI['cache_str'].'" class="rzj">';
	}
	//if (!empty($RZ))$O.= '<div class="payrz">'.RZ_html($RZ,'s','color').'</div>';
	$O.= '</a>';
	if($i!='top'){
		if($i % 2 == 0 && $_ZEAI['m_mb_index'] == 1)$O.= '<div class="clear"></div>';
	}
	return $O;
}
function getUlist1($SQLU) {
	global $nodatatips,$db,$_ZEAI,$_INDEX,$cook_uid,$cook_sex,$cook_grade,$zeai_cn,$FLDU,$showtype;
	$rt=$db->query("SELECT $FLDU FROM ".__TBL_USER__." WHERE ".$SQLU." ORDER BY refresh_time DESC LIMIT ".$_INDEX['iModuleU_num']);
	$total = $db->num_rows($rt);
	if ($total > 0) {
		for($i=1;$i<=$total;$i++) {
			$rows = $db->fetch_array($rt,'name');
			if(!$rows)break;
			$O .= rows_ulist($rows,$i);
		}
		return $O;
	}else{
		return $nodatatips;
	}
}
function party_djs($flag,$jzbmtime) {
	$d1  = ADDTIME;
	$d2  = $jzbmtime;
	$totals  = ($d2-$d1);
	$day     = intval( $totals/86400 );
	$hour    = intval(($totals % 86400)/3600);
	$hourmod = ($totals % 86400)/3600 - $hour;
	$minute  = intval($hourmod*60);
	if ($flag >= 2)$totals = -1;
	if ($totals > 0) {
		$tmp='<span class="jzbmT"><i class="ico">&#xe634;</i> 剩</span>';
		if ($day > 0){
			$O = $tmp."<span class=timestyle>$day</span>天";
		} else {
			$O = $tmp;
		}
		$O .= "<span class=timestyle>$hour</span>时<span class=timestyle>$minute</span>分";
	} else {
		switch ($flag){ 
			case 1:$flag_str = "<span class='partyflag1'>火热报名中</span>";break;
			case 2:$flag_str = "<span class='partyflag2'>正在举办中</span>";break;
			case 3:$flag_str = "<span class='partyflag3'>活动已经结束</span>";break;
		}
		$O = '<font class="S14">'.$flag_str.'</font>';
	}
	$O = '<font>'.$O.'</font>';
	return $O;
}
ob_end_flush();?>